<template>
  <div class="info">
    <div class="userInfo">
      <h1>{{ student['姓名'] }}</h1>
      <div class="detail">
        <div class="detail-icon">
          <p>
            <span class="area" v-if="student['省份']">{{ student['省份'] }}</span>
            <span v-if="student.isdao" class="isdao">已报道</span>
            <span v-else class="un-isdao">未报到</span>
            <strong style="font-weight: 500;">{{ student['学号'] }}</strong>
          </p>
          <p v-if="student.isdao">
            {{ student.createTime }}
          </p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    student: {
      type: [Object],
      default: () => {}
    }
  }
}
</script>

<style scoped>
  .info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* box-shadow: 0px 0px 6px 0px rgba(0,0,0,.2); */
    border-bottom: 1px solid #ccc;
    padding: 8px;
    /* border-radius: 8px; */
    margin: 5px;
  }

  h1,p {
    margin: 0px;
    padding: 0px;
  }

  .info .userInfo {
    display: flex;
    align-items: center;
  }

  .info .userInfo h1 {
    font-size: 24px;
    margin-right: 15px;
  }

  .info .userInfo p {
    font-size: 16px;
  }

  .info .userInfo .detail .detail-icon span{
    padding: 2px 6px;
    border-radius: 5px;
    line-height: 24px;
    font-size: 12px;
    margin-right: 8px;
  }

  .info .userInfo .detail .detail-icon .area {
    color: #FF7D00;
    background: #fceada;
  }

  .info .userInfo .detail .detail-icon .un-isdao {
    color: #FF69B4;
    background: #FFF0F5;
  }

  .info .userInfo .detail .detail-icon .isdao {
    color: #52C41A;
    background: #efffdf;
  }

</style>
